﻿Imports Runa.Common.Helper
Imports Runa.Common.Helper.Helper
Imports Windows.Graphics.Imaging
Imports Windows.Storage.Streams
Imports System.Runtime.InteropServices
Imports System.Runtime.InteropServices.WindowsRuntime
Imports Microsoft.Xna.Framework

Public Class GameViewModel

    Public Property Title() As String
    Public Property Subtitle() As String
    Public Property Image() As ImageSource

    Private Shared Property ColorCount() As Integer

    Public Sub New(ByVal t As String, ByVal s As String)
        Me.Title = t
        Me.Subtitle = s
        Me.Image = GetIndexedColor(ColorCount).GetPureColorTexture(60, 60)
        ColorCount += 1
    End Sub

    Public Sub New(ByVal t As String, ByVal s As String, ByVal i() As Byte)
        Me.Title = t
        Me.Subtitle = s
        Dim bmp As BitmapImage = Nothing
        bmp.FromBytes(i)
        Me.Image = bmp
        ColorCount += 1
    End Sub

    Public Sub New(ByVal t As String, ByVal s As String, ByVal i As ImageSource)
        Me.Title = t
        Me.Subtitle = s
        Me.Image = i
        ColorCount += 1
    End Sub

End Class